#include "cuda_helper.h"
#include "cuda_info.hh"
#include <cuda_runtime_api.h>

CudaInfo::CudaInfo(){
	int count = 0;

	CUDA_CALL(cudaGetDeviceCount(&count));
	devices = (unsigned int)count;

	cudaDeviceProp prop;
	CUDA_CALL(cudaGetDeviceProperties(&prop, 0));
	warpSize = (unsigned int)prop.warpSize;
	blockSize = prop.maxThreadsPerBlock / warpSize;
	threadsInBlock = prop.maxThreadsPerBlock;
}

CudaInfo::~CudaInfo(){

}

CudaInfo *cuda_info = NULL;
void CudaInfo_Init(){
	cuda_info = new CudaInfo();
}
